import {
	CAROUSEL,
	SERIESLESSON,
	FACETOFACELESSON,
	SERIESCLASSTOP,
	TABS,
	DETAIL_HEAD,
	DETAIL_BASEINFO,
	DETAIL_MYSERVICE,
	DETAIL_TEACHERTEAM,
	DETAIL_TUTORTEAM,
	DETAIL_LEARNINGMODE,
	DETAIL_STAGE,
	DETAIL_LEAVEMSG,
	DETAIL_QUESTION,
	WHATISLIGHTLESSON,
	SYNCLESSON,
	FACETOFACE,
	PLAYER,
	OFFLINETEACH,
	MYCLASSMATE_INFO,
	TEACHERINFO,
	OUTLINEINFO,
	TESTINFO,
	DATAINFOS,
	ORCODE,
	LABELS,
	ITEMLIST,
	TUTORRIALINFO,
	TABBAR,
} from './method-type'
	export default{
		//顶部录播表
		[CAROUSEL](state,carousel){
			
			if(carousel instanceof Array){
				state.carousel.splice(0,state.carousel.length)
				while(carousel.length){
					state.carousel.push(carousel.shift())
				}
			}else{
				state.carousel.splice(0,state.carousel.length)
				state.carousel[0]._id = carousel[0]._id;
				state.carousel[0].imgurl = carousel[0].imgurl;
				state.carousel[0].link = carousel[0].link;
			}
			

		},
		//首页就业课程表
		[SERIESLESSON](state,serieslesson){
			if(serieslesson instanceof Array){
				state.serieslesson.splice(0,state.serieslesson.length)
				while(serieslesson.length){
					state.serieslesson.push(serieslesson.shift())
				}
			}
			// state.serieslesson._id = serieslesson._id;
			// state.serieslesson.maxtitle = serieslesson.maxtitle;
			// state.serieslesson.fist_img_url = serieslesson.fist_img_url;
			
			// //items 数组赋值
			// for(let i=0;i<serieslesson.items.length;i++){
			// 	state.serieslesson.items[i].utitle = serieslesson.items[i].utitle;
			// 	state.serieslesson.items[i].uimg = serieslesson.items[i].uimg; 
			// 	state.serieslesson.items[i].udesc = serieslesson.items[i].udesc; 
			// 	state.serieslesson.items[i].link = serieslesson.items[i].link; 
			// 	state.serieslesson.items[i].class_id = serieslesson.items[i].class_id;
			// }
			
		},
		//首页面授同步课程表
		[FACETOFACELESSON](state,facetofacelesson){
			if(facetofacelesson instanceof Array){
				state.facetofacelesson.splice(0,state.facetofacelesson.length)
				while(facetofacelesson.length){
					state.facetofacelesson.push(facetofacelesson.shift())
				}
			}
			// state.facetofacelesson._id = facetofacelesson._id;   
			// state.facetofacelesson.maxtitle = facetofacelesson.maxtitle;   
			// state.facetofacelesson.imgurl = facetofacelesson.imgurl;   
			// state.facetofacelesson.title = facetofacelesson.title;   
			// state.facetofacelesson.timecontent = facetofacelesson.timecontent;   
			// state.facetofacelesson.description = facetofacelesson.description;   
			// state.facetofacelesson.price = facetofacelesson.price;   
			// state.facetofacelesson.originalprice = facetofacelesson.originalprice;   
			// state.facetofacelesson.link = facetofacelesson.link;   
			// state.facetofacelesson.lightlesson_id = facetofacelesson.lightlesson_id; 
		},
		//就业课程内部顶部图片展示表
		[SERIESCLASSTOP](state,seriesclasstop){
			
			state.seriesclasstop._id = seriesclasstop._id;
			state.seriesclasstop.minTitle = seriesclasstop.minTitle;
			state.seriesclasstop.maxTitle = seriesclasstop.maxTitle;
			// state.seriesclasstop.tabs_id = seriesclasstop.tabs_id;
			state.seriesclasstop.info.timeTitle = seriesclasstop.info.timeTitle;
			state.seriesclasstop.info.diffTitle = seriesclasstop.info.diffTitle;
			state.seriesclasstop.info.wageTitle = seriesclasstop.info.wageTitle;
			state.seriesclasstop.info.time = seriesclasstop.info.time;
			state.seriesclasstop.info.diff = seriesclasstop.info.diff;
			state.seriesclasstop.info.wage = seriesclasstop.info.wage;
			state.seriesclasstop.info.img_url = seriesclasstop.info.img_url;
			// state.seriesclasstop.info.introduction.head_id = seriesclasstop.info.introduction.head_id;
			// state.seriesclasstop.info.introduction.baseinfo_id = seriesclasstop.info.introduction.baseinfo_id;
			// state.seriesclasstop.info.introduction.myservice_id = seriesclasstop.info.introduction.myservice_id;
			// state.seriesclasstop.info.introduction.teacherteam_id = seriesclasstop.info.introduction.teacherteam_id;
			// state.seriesclasstop.info.introduction.tutorteam_id = seriesclasstop.info.introduction.tutorteam_id;
			// state.seriesclasstop.info.introduction.learningmode_id = seriesclasstop.info.introduction.learningmode_id;
			// state.seriesclasstop.info.directory = seriesclasstop.info.directory;
			// state.seriesclasstop.info.leavemsg = seriesclasstop.info.leavemsg;
			// state.seriesclasstop.info.question = seriesclasstop.info.question;
		},
		//tab切换表
		[TABS](state,tabs){

			state.tabs._id = tabs._id;
			state.tabs.Introduction = tabs.Introduction;
			state.tabs.Directory = tabs.Directory;
			state.tabs.Appraise = tabs.Appraise;
			state.tabs.Question = tabs.Question;
			state.tabs.try = tabs.try;
		},
		//----------------start---------------------------------------------
		//就业课程内部的头部表
		[DETAIL_HEAD](state,detail_head){
		
			state.detail_head._id = detail_head._id; 
			state.detail_head.maxTitle = detail_head.maxTitle; 
			state.detail_head.detail_price = detail_head.detail_price.$numberDecimal; 
			state.detail_head.description = detail_head.description; 
			state.detail_head.timeTitle = detail_head.timeTitle; 
			state.detail_head.diffTitle = detail_head.diffTitle; 
			state.detail_head.wageTitle = detail_head.wageTitle; 
			state.detail_head.diff = detail_head.diff; 
			state.detail_head.time = detail_head.time; 
			state.detail_head.wage = detail_head.wage; 
		},
		//基本信息表
		[DETAIL_BASEINFO](state,detail_baseinfo){
			state.detail_baseinfo._id = detail_baseinfo._id; 
			state.detail_baseinfo.maxTitle = detail_baseinfo.maxTitle;
			state.detail_baseinfo.description = detail_baseinfo.description;
			//items数组赋值
			if(state.detail_baseinfo.items.length){
				state.detail_baseinfo.items.splice(0,state.detail_baseinfo.items.length);
			}
			while(detail_baseinfo.items.length){
				state.detail_baseinfo.items.push(detail_baseinfo.items.shift())
			}
			//colums
			if(state.detail_baseinfo.columns.length){
				state.detail_baseinfo.columns.splice(0,state.detail_baseinfo.columns.length);
			}
			while(detail_baseinfo.columns.length){
				state.detail_baseinfo.columns.push(detail_baseinfo.columns.shift())
			}
			//tabdata
			if(state.detail_baseinfo.tabdata.length){
				state.detail_baseinfo.tabdata.splice(0,state.detail_baseinfo.tabdata.length);
			}
			while(detail_baseinfo.tabdata.length){
				state.detail_baseinfo.tabdata.push(detail_baseinfo.tabdata.shift())
			}


		},
		//我们的服务
		[DETAIL_MYSERVICE](state,detail_myservice){
			state.detail_myservice._id = detail_myservice._id; 
			state.detail_myservice.maxTitle = detail_myservice.maxTitle; 
			state.detail_myservice.maxTese = detail_myservice.maxTese; 
			state.detail_myservice.backgcolor = detail_myservice.backgcolor; 
			//items数组赋值
			if(state.detail_myservice.items.length){
				state.detail_myservice.items.splice(0,state.detail_myservice.items.length);
			}
			while(detail_myservice.items.length){
				state.detail_myservice.items.push(detail_myservice.items.shift());
			}
		},
		//讲师团队
		[DETAIL_TEACHERTEAM](state,detail_teacherteam){

			state.detail_teacherteam._id = detail_teacherteam._id;
			state.detail_teacherteam.maxTitle = detail_teacherteam.maxTitle;
			//teachers数组赋值
			if(state.detail_teacherteam.teachers.length){
				state.detail_teacherteam.teachers.splice(0,state.detail_teacherteam.teachers.length);
			}
			while(detail_teacherteam.teachers.length){
				state.detail_teacherteam.teachers.push(detail_teacherteam.teachers.shift());
			}
		},
		//导师团队
		[DETAIL_TUTORTEAM](state,detail_tutorteam){
			
			state.detail_tutorteam._id = detail_tutorteam._id;
			state.detail_tutorteam.maxTitle = detail_tutorteam.maxTitle;
			//turtors 数组赋值
	
			if(state.detail_tutorteam.tutors.length){
				state.detail_tutorteam.tutors.splice(0,state.detail_tutorteam.tutors.length);
			}
			while(detail_tutorteam.tutors.length){
				state.detail_tutorteam.tutors.push(detail_tutorteam.tutors.shift())
			}
		},
		//学习方式
		[DETAIL_LEARNINGMODE](state,detail_learningmode){
			state.detail_learningmode._id = detail_learningmode._id;
			state.detail_learningmode.minTitle = detail_learningmode.minTitle;
			//turtors 数组赋值
			if(state.detail_learningmode.courses.length){
				state.detail_learningmode.courses.splice(0,state.detail_learningmode.courses.length);
			}
			while(detail_learningmode.courses.length){
				state.detail_learningmode.courses.push(detail_learningmode.courses.shift())
			}
		},
		//目录选项卡里边的阶段信息
		[DETAIL_STAGE](state,detail_stage){
			state.detail_stage._id = detail_stage._id;
			state.detail_stage.stageTitle = detail_stage.stageTitle;
			state.detail_stage.stageContentTitle = detail_stage.stageContentTitle;
			state.detail_stage.more = detail_stage.more;

			//contents 数组赋值
			if(state.detail_stage.contents.length){
				state.detail_stage.contents.splice(0,state.detail_stage.contents.length);
			}
			while(detail_stage.contents.length){
				state.detail_stage.contents.push(detail_stage.contents.shift())
			}
			//chapter 数组赋值
			if(state.detail_stage.chapter.length){
				state.detail_stage.chapter.splice(0,state.detail_stage.chapter.length);
			}
			while(detail_stage.chapter.length){
				state.detail_stage.chapter.push(detail_stage.chapter.shift())
			}
			
		},
		//留言评价
		[DETAIL_LEAVEMSG](state,detail_leavemsg){
			//leavemsg 数组赋值
			if(state.detail_leavemsg.length){
				state.detail_leavemsg.splice(0,state.detail_leavemsg.length);
			}
			while(detail_leavemsg.length){
				state.detail_leavemsg.push(detail_leavemsg.shift())
			}
		},
		//问题
		[DETAIL_QUESTION](state,detail_question){
			if(state.detail_question.length){
				state.detail_question.splice(0,state.detail_question.length);
			}
			while(detail_question.length){
				state.detail_question.push(detail_question.shift());
			}
		},
		//----------------end---------------------------------------------
		//----------------start-------------------------------------------
		//面授同步课程内部组件常量
		//轻课
		[WHATISLIGHTLESSON](state,whatislightlesson){

			state.whatislightlesson._id = whatislightlesson._id;
			state.whatislightlesson.maxTitle = whatislightlesson.maxTitle; 
			state.whatislightlesson.desc = whatislightlesson.desc; 
			state.whatislightlesson.imgLocation = whatislightlesson.imgLocation; 
			state.whatislightlesson.title = whatislightlesson.title; 
			state.whatislightlesson.des = whatislightlesson.des; 
			state.whatislightlesson.btnTitle = whatislightlesson.btnTitle; 
			state.whatislightlesson.videoUrl = whatislightlesson.videoUrl; 
		},
		//同步课程
		[SYNCLESSON](state,synclesson){
			state.synclesson._id = synclesson._id;
			state.synclesson.maxTitle = synclesson.maxTitle; 
			state.synclesson.description = synclesson.description; 

			//classes 数组赋值
			if(state.synclesson.classes.length){
				state.synclesson.classes.splice(0,state.synclesson.classes.length);
			}
			while(synclesson.classes.length){
				state.synclesson.classes.push(synclesson.classes.shift()); 
			}
			state.synclesson.birdPrice = synclesson.birdPrice; 
			state.synclesson.originPrice = synclesson.originPrice; 
			state.synclesson.qqTeam = synclesson.qqTeam; 
			
			//advantages 数组赋值
			if(state.synclesson.Advantages.length){
				state.synclesson.Advantages.splice(0,state.synclesson.Advantages.length);
			}
			while(synclesson.Advantages.length){
				state.synclesson.Advantages.push(synclesson.Advantages.shift()) ;
			}
		},
		//面授同步班
		[FACETOFACE](state,facetoface){

			state.facetoface._id = facetoface._id;
			state.facetoface.maxTitle = facetoface.maxTitle;
			//items 数组赋值
			if(state.facetoface.items.length){
				state.facetoface.items.splice(0,state.facetoface.items.length);
			}
			while(facetoface.items.length){
				state.facetoface.items.push(facetoface.items.shift());
			}
		},
		//免费课程试听
		[PLAYER](state,player){
			state.player._id = player._id;
			state.player.maxTitle = player.maxTitle;
			state.player.url = player.url;
		},
		//线下教学实拍
		[OFFLINETEACH](state,offlineteach){
			state.offlineteach.maxTitle = offlineteach.maxTitle;
			state.offlineteach.des = offlineteach.des;
			//imgs 数组赋值
			if(state.offlineteach.imgs.length){
				state.offlineteach.imgs.splice(0,state.offlineteach.imgs.length);
			}
			while(offlineteach.imgs.length){
				state.offlineteach.imgs.push(offlineteach.imgs.shift());
			}
		},
		//我的同学
		[MYCLASSMATE_INFO](state,myclassmate_info){
			state.myclassmate_info._id = myclassmate_info._id;
			state.myclassmate_info.maxTitle = myclassmate_info.maxTitle;
			//myclassmates 数组赋值
			if(state.myclassmate_info.myclassmates.length){
				state.myclassmate_info.myclassmates.splice(0,state.myclassmate_info.myclassmates.length);
			}
			while(myclassmate_info.myclassmates.length){
				state.myclassmate_info.myclassmates.push(myclassmate_info.myclassmates.shift());
			}
		},
		//卡片展示教师
		[TEACHERINFO](state,teacherinfo){
			state.teacherinfo._id = teacherinfo._id;
			state.teacherinfo.maxTitle = teacherinfo.maxTitle;
			//teachers 数组赋值
			if(state.teacherinfo.teachers.length){
				state.teacherinfo.teachers.splice(0,state.teacherinfo.teachers.length);
			}
			while(teacherinfo.teachers.length){
				state.teacherinfo.teachers.push(teacherinfo.teachers.shift());
			}
		},
		//教学大纲
		[OUTLINEINFO](state,outlineinfo){
			state.outlineinfo._id = outlineinfo._id;
			state.outlineinfo.maxTitle = outlineinfo.maxTitle;
			state.outlineinfo.desc = outlineinfo.desc;
			//steps 数组赋值
			if(state.outlineinfo.steps.length){
				state.outlineinfo.steps.splice(0,state.outlineinfo.steps.length);
			}
			while(outlineinfo.steps.length){
				state.outlineinfo.steps.push(outlineinfo.steps.shift());
			}

		},
		//测试自己
		[TESTINFO](state,testinfo){
		
			state.testinfo.maxTitle = testinfo.maxTitle; 
			state.testinfo.btnText = testinfo.btnText; 
			state.testinfo.item1 = testinfo.item1; 
			state.testinfo.item2 = testinfo.item2; 
			state.testinfo.item3 = testinfo.item3; 
			state.testinfo.item4 = testinfo.item4; 
			state.testinfo.img = testinfo.img; 
		},
		//问题
		[DATAINFOS](state,datainfos){

			//datainfos 数组赋值
			if(state.datainfos.length){
				state.datainfos.splice(0,state.datainfos.length);
			}
			while(datainfos.length){
				state.datainfos.push(datainfos.shift());
			}
		},
		//二维码
		[ORCODE](state,orcode){
	
			state.orcode._id = orcode._id;
			state.orcode.img = orcode.img;
			state.orcode.line = orcode.line;
		},
		//---------------end----------------------------
		//课程narbar
		[LABELS](state,labels){
			//labels 数组赋值
	
			for(let i=0;i<labels.length;i++){
				state.labels.push(labels[i].label);
			}
		},
		[ITEMLIST](state,itemlist){
			//itemlist 数组赋值
			if(itemlist instanceof Array){
				state.itemlist.splice(0,state.itemlist.length);
				while(itemlist.length){
					state.itemlist.push(itemlist.shift())
				}
			}
			// for(let i=0;i<itemlist.length;i++){

				// state.itemlist[i].titleimg = itemlist[i].titleimg;
				// state.itemlist[i].coursenumber = itemlist[i].coursenumber;
				// state.itemlist[i].result = itemlist[i].result;
				// state.itemlist[i].icon = itemlist[i].icon;
				// state.itemlist[i].new_price = itemlist[i].new_price;
				// state.itemlist[i].old_price = itemlist[i].old_price;
				// state.itemlist[i].personnumber = itemlist[i].personnumber;
				// state.itemlist[i].link = itemlist[i].link;
				// state.itemlist[i].tutorial_id = itemlist[i].tutorial_id;
			// }
		},

		//Tutorial详情页
		[TUTORRIALINFO](state,tutorrialinfo){

			state.tutorrialinfo._id = tutorrialinfo._id;
			state.tutorrialinfo.videUrl = tutorrialinfo.videUrl;

			state.tutorrialinfo.Title.title = tutorrialinfo.Title.title; 
			state.tutorrialinfo.Title.numbers = tutorrialinfo.Title.numbers; 
			state.tutorrialinfo.Title.classs = tutorrialinfo.Title.classs; 
			state.tutorrialinfo.Title.minute = tutorrialinfo.Title.minute; 
			state.tutorrialinfo.Title.difficulty = tutorrialinfo.Title.difficulty; 

			state.tutorrialinfo.discounted.disc_price_int = tutorrialinfo.discounted.disc_price_int.$numberDecimal;  
			state.tutorrialinfo.discounted.disc_price_dec = tutorrialinfo.discounted.disc_price_dec.$numberDecimal;  
			state.tutorrialinfo.discounted.old_price = tutorrialinfo.discounted.old_price.$numberDecimal;  
			state.tutorrialinfo.discounted.disc_day = tutorrialinfo.discounted.disc_day;  
			state.tutorrialinfo.discounted.disc_hour = tutorrialinfo.discounted.disc_hour;  
			state.tutorrialinfo.discounted.disc_minute = tutorrialinfo.discounted.disc_minute;  
			state.tutorrialinfo.discounted.disc_second = tutorrialinfo.discounted.disc_second;  

			state.tutorrialinfo.labelTitles.Introduction = tutorrialinfo.labelTitles.Introduction;  
			state.tutorrialinfo.labelTitles.Directory = tutorrialinfo.labelTitles.Directory;  
			state.tutorrialinfo.labelTitles.Appraise = tutorrialinfo.labelTitles.Appraise;  
			state.tutorrialinfo.labelTitles.Question = tutorrialinfo.labelTitles.Question;  
			state.tutorrialinfo.labelTitles.try = tutorrialinfo.labelTitles.try;  

			state.tutorrialinfo.avatarHead.head = tutorrialinfo.avatarHead.head;   
			state.tutorrialinfo.avatarHead.name = tutorrialinfo.avatarHead.name;   
			state.tutorrialinfo.avatarHead.desc = tutorrialinfo.avatarHead.desc;   
			//imgs 数组赋值
			if(state.tutorrialinfo.imgs.length){
				state.tutorrialinfo.imgs.splice(0,state.tutorrialinfo.imgs.length);
			}
			while(tutorrialinfo.imgs.length){
				state.tutorrialinfo.imgs.push(tutorrialinfo.imgs.shift());
			}
			//list 数组赋值
			if(state.tutorrialinfo.list.length){
				state.tutorrialinfo.list.splice(0,state.tutorrialinfo.list.length);
			}
			while(tutorrialinfo.list.length){
				state.tutorrialinfo.list.push(tutorrialinfo.list.shift());
			}

			state.tutorrialinfo.score.total = tutorrialinfo.score.total; 
			state.tutorrialinfo.score.numbers = tutorrialinfo.score.numbers; 
			state.tutorrialinfo.score.easy = tutorrialinfo.score.easy; 
			state.tutorrialinfo.score.practical = tutorrialinfo.score.practical; 
			state.tutorrialinfo.score.clear = tutorrialinfo.score.clear; 
		},
		//导航条
		[TABBAR](state,tabbar){
			state.tabbar._id = tabbar._id;
			state.tabbar.home.name = tabbar.home.name; 
			state.tabbar.home.link = tabbar.home.link; 
			state.tabbar.course.name = tabbar.course.name; 
			state.tabbar.course.link = tabbar.course.link; 
			state.tabbar.classroom.name = tabbar.classroom.name; 
			state.tabbar.classroom.link = tabbar.classroom.link; 
			state.tabbar.my.name = tabbar.my.name; 
			state.tabbar.my.link = tabbar.my.link; 
			state.tabbar.first =  tabbar.first;
			state.tabbar.coupons.title = tabbar.coupons.title; 
			state.tabbar.coupons.content = tabbar.coupons.content; 
			state.tabbar.coupons.buybtntitle = tabbar.coupons.buybtntitle; 
			state.tabbar.coupons.buybtncolor = tabbar.coupons.buybtncolor; 
			state.tabbar.coupons.couponbtntitle = tabbar.coupons.couponbtntitle; 
			state.tabbar.tutorialbtn.title = tabbar.tutorialbtn.title; 
			state.tabbar.tutorialbtn.btncolor = tabbar.tutorialbtn.btncolor; 
		},

	}